fetch('data.json')
    .then(response => response.json())
    .then(data => {
        let appList = document.getElementById('app-list');
        data.forEach(app => {
            let appItem = document.createElement('div');
            appItem.classList.add('app');

            appItem.innerHTML = `
                <p>${app.name}</p>
                <a href="${app.download}" target="_blank">下载</a>
            `;

            appList.appendChild(appItem);
        });
    })
    .catch(error => console.error('加载失败:', error));